import request from '@/utils/request'

// 获取部门列表
export const getDepartmentListApi = ()=>{
    return request({
        url:'/company/department',
        method:'get'
    })
}

// 获取部门详情
export const getDepartmentInfoApi = (id)=>{
    return request({
        url:'/company/department/'+ id,
        method:'get'
    })
}


// 添加部门
export const addDepartmentApi = (data)=>{
    return request({
        url:'/company/department',
        method:'post',
        data
    })
}


// 修改部门
export const editDepartmentApi = (data)=>{
    return request({
        url:'/company/department/'+data.id,
        method:'put',
        data
    })
}

// 删除部门
export const delDepartmentInfoApi = (id)=>{
    return request({
        url:'/company/department/'+ id,
        method:'delete'
    })
}



// 获取部门负责人数据
export const getManagerApi = ()=>{
    return request({
        url:'/sys/user/simple',
        method:'get'
    })
}